package hn.cch.web.request.property;

import java.beans.PropertyEditorSupport;

public class CustomExampleEditor extends PropertyEditorSupport {

    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        String[] split = text.split(",");
        CustomExampleEntity entity = new CustomExampleEntity();
        entity.setId(Long.parseLong(split[0]));
        entity.setName(split[1]);
        super.setValue(entity);
    }
}
